package com.nowcoder.community.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nowcoder.community.entity.Comment;

import java.util.List;
import java.util.Map;

/**
 * @author szq
 * @create 2023-01-23 16:13
 * @description
 */
public interface CommentService extends IService<Comment> {

    List<Comment> findCommentsByEntity(int entityType, int entityId, int offset, int limit);

    List<Map<String,Object>> findCommentsByUserId(int userId, int offset, int limit);

    int findCountByEntity(int entityType,int entityId);

    int addComment(Comment comment);

    long findCommentCount(int userId);
}
